package io.github.kuafucv.zero.log.core.match;

import org.springframework.util.AntPathMatcher;

public class ZeroLogAntPathMatcher {

    private static final String MATCH_ALL = "/**";
    private static final AntPathMatcher MATCHER = new AntPathMatcher();

    public static boolean matchPath(String path, String pattern) {
        if (pattern.equals(MATCH_ALL)) {
            return true;
        }
        return MATCHER.match(pattern, path);
    }

}
